<%--
  Created by IntelliJ IDEA.
  User: 王宝田
  Date: 2022/6/27
  Time: 10:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册</title>
    <link rel="stylesheet" href="../css/login.css"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">

</head>


<style>
    body{
        background: url(../image/001.jpg) no-repeat;
        background-size:100% auto;
    }
</style>
<body >
<div align="center">
    <h1>注册</h1>
    <form  name="form" method="post" action="zhuce" onsubmit="return userCheck()">
        <input type="text" name="username" placeholder="用户名"><br/>
        <input type="text"  name="password" placeholder="密码"><br/>
        <input type="text" name="type" placeholder="身份"><br/>
        <input type="text" name="classes" placeholder="班级"><br/>
        <input type="text" name="sex" placeholder="性别"><br/>
        <input type="text" name="age" placeholder="年龄"><br/>
        <input type="text" name="phone" placeholder="电话"><br/>
        <input type="text" name="address" placeholder="地址"><br/>
        <input type="submit" name="submit" value="注册"><br/>
        <a href="index">返回</a>
    </form>
</div>
<script type="text/javascript">
    function userCheck(){
        if(document.form.username.value==""){
            window.alert("请输入用户名");
            return false;
        }
        if(document.form.password.value==""){
            window.alert("请输入用户密码");
            return false;
        }
        if(document.form.type.value==""){
            window.alert("请输入用户身份");
            return false;
        }if(document.form.classes.value==""){
            window.alert("请输入班级");
            return false;
        }if(document.form.age.value==""){
            window.alert("请输入年龄");
            return false;
        }if(document.form.phone.value==""){
            window.alert("请输入电话");
            return false;
        }if(document.form.address.value==""){
            window.alert("请输入地址");
            return false;
        }
        if(document.form.sex.value==""){
            window.alert("请输入性别");
            return false;
        }
        return true;
    }
</script>
</body>
</html>
